function[ap] = ap2kp1(kp_index),
%!caution uses the rounded kp indices (ie .3 and .7 instead .33 and .67)
switch kp_index
case	0,	ap	=	0;
case	0.3,	ap	=	2;
case	0.7,	ap	=	3;
case	1.0,	ap	=	4;
case	1.3,	ap	=	5;
case	1.7,	ap	=	6;
case	2.0,	ap	=	7;
case	2.3,	ap	=	9;
case	2.7,	ap	=	12;
case	3.0,	ap	=	15;
case	3.3,	ap	=	18;
case	3.7,	ap	=	22;
case	4.0,	ap	=	27;
case	4.3,	ap	=	32;
case	4.7,	ap	=	39;
case	5.0,	ap	=	48;
case	5.3,	ap	=	56;
case	5.7,	ap	=	67;
case	6.0,	ap	=	80;
case	6.3,	ap	=	94;
case	6.7,	ap	=	111;
case	7.0,	ap	=	132;
case	7.3,	ap	=	154;
case	7.7,	ap	=	179;
case	8.0,	ap	=	207;
case	8.3,	ap	=	236;
case	8.7,	ap	=	300;
case	9.0,	ap	=	400;
    otherwise, fprintf('error in ap value: ap = %d \n',ap_index);  
end;